
env = Environment()
env[ 'CCFLAGS' ] = '-g -O2 -fPIC -D_THREAD_SAFE -pthread  -Wall -Wno-sign-compare'
env[ 'CPPPATH' ] = [ '../include', '../../include', '../../../include', '../include/sakcab','/home/s/include', ]
env[ 'CPPFLAGS' ] = []
env[ 'LIBDIR' ] = '../../lib'
env[ 'LIBPATH' ] = [ '/home/s/lib/static', ]
env[ 'LIBS' ] = ['boost_filesystem-mt', 'boost_system-mt', 'boost_thread-mt','pthread',]

libdir = '../../lib'
incdir = '../../include'

libfile = env.StaticLibrary('sakcab_packet', ['packet.pb.cpp', ])
libfilename = str(libfile[0])

env.Command( '../lib/%s' % libfilename, libfilename, Copy("$TARGET","$SOURCE") )
env.Command( '%s/%s' % (libdir, libfilename), libfilename, Copy("$TARGET","$SOURCE") )

head_file = 'packet.pb.h'
env.Command( '%s/sakcab/%s' % (incdir, head_file), '../include/%s' % head_file, Copy("$TARGET","$SOURCE") )


